package com.ithema.anno;

import com.ithema.validation.StateValidation;

import javax.validation.Constraint;
import java.lang.annotation.*;

/**
 * 自定义校验注解
 */
@Documented
@Target(ElementType.FIELD)//可使用范围
@Retention(RetentionPolicy.RUNTIME)
@Constraint(validatedBy = { StateValidation.class})
public @interface State {
    //失败返回的信息
    String message() default "status值只能是已发布或者草稿";
//分组
    Class<?>[] groups() default { };

    Class<?>[] payload() default { };

}
